Imports System.Data

Public Class View_Suppliers
    Private Sub View_Suppliers_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        SupplierList.Items.Clear()
    End Sub
    Public Sub DisplaySuppliers(ByRef SupplierTable As DataTable)
        Dim ListRow As ListViewItem
        Dim Row As DataRow

        SupplierList.Items.Clear()
        SupplierList.BeginUpdate()

        For Each Row In SupplierTable.Rows
            ListRow = New ListViewItem(Row("Sup_ID").ToString())
            ListRow.SubItems.Add(Row("Tier_No").ToString())
            ListRow.SubItems.Add(Row("Sup_Q").ToString())
            ListRow.SubItems.Add(Row("Sup_Cap").ToString())
            ListRow.SubItems.Add(Row("Sup_Cost").ToString())
            ListRow.SubItems.Add(Math.Round(Row("q_c_ratio"), 3).ToString())
            SupplierList.Items.Add(ListRow)
        Next

        SupplierList.EndUpdate()

    End Sub
End Class